package net.topikachu.dynamic.faces;

import java.io.IOException;

import javax.el.ELException;
import javax.faces.FacesException;
import javax.faces.component.UIComponent;

import com.sun.facelets.FaceletContext;
import com.sun.facelets.FaceletException;
import com.sun.facelets.tag.TagConfig;
import com.sun.facelets.tag.TagHandler;

public class InsertWidgetHandler extends TagHandler {

	public InsertWidgetHandler(TagConfig config) {
		super(config);

	}

	public void apply(FaceletContext ctx, UIComponent parent)
			throws IOException, FacesException, FaceletException, ELException {
		WidgetPlaceHolderStack stack = WidgetPlaceHolderStack.getStack(ctx);
		stack.push(parent);
	}

}
